package com.teach.demo01;

import java.util.ArrayList;
import java.util.List;

/**
 * 自动售卖机
 * @author J.L.Zhou
 *
 */
public class Machine {
	
	private List<Product> list = new ArrayList<>();
	
	private long idCount=1;
	
	
	/**
	 * 添加一个商品
	 * @param product
	 */
	public void add(Product product){
		product.setId(idCount++);
		list.add(product);
	}
	
	public List<CountResult> list(){
		
		return null;
	}


	@Override
	public String toString() {
		return "Machine:"+list.toString();
	}
	
}
